<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../lib/vue-2.5.17/dist/vue.js"></script>
</head>

<body>

    <div id='app'></div>

    <script>
        var login = {
            template:'<h1>这是登录组件</h1>'
        }
        var vm = new Vue({
            el: '#app',
            data: {},
            methods: {},
            render(createElement){ //createElement是一个方法，调用它能够把指定的组件模板渲染为html结构
                return createElement(login)
            } //注意：这里return的结果会替换el指定的容器
            //注意与component插入页面方式的区别
        })
    </script>

</body>

</html>